package ru.papergames.web.blines.battle.network.serverpackets;

import ru.papergames.web.blines.battle.network.ClientWebServer;


/**
 * @author: atroshanin
 * Date: 22.05.2010
 * Time: 18:52:59
 */
public class WebServerAuthPassed extends WebServerServerPacket {
    @Override
    protected void readImpl() {
    }

    @Override
    protected void runImpl() {
        getClient().setState(ClientWebServer.ClientWebServerState.AUTHED);
        getClient().getConnectionHolder().setClientWebServer(getClient());
        getClient().getConnectionHolder().disconnectOldClientWebServer();
    }

    @Override
    public String getType() {
        return "[s] WebServerAuthPassed [" + WEB_SERVER_AUTH_PASSED_PACKET_ID + "]";
    }
}
